<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script type="text/javascript" src="{$smarty.const.__PUBLIC_JS__}/jquery-3.1.1.js"></script>
    <script type="text/javascript" src="{$smarty.const.__PUBLIC_JS__}/jquery.min.js"></script>
    <script type="text/javascript" src="{$smarty.const.__PUBLIC_JS__}/ajaxfileupload.js"></script>
    <script type="text/javascript" src="{$smarty.const.__PUBLIC_JS__}/consult_message.js"></script>
</head>
<body>
<!--这里是标记用哪一个数据库的 不能删除-->
<input type="hidden" id="which_DB" value="ssg_host_sale">
<div class="top" style="width: 500px ;height: 100px;">
    {foreach $list as $k =>$v}
    {if $v.pid == $pid.id}
    <div><a href="{$smarty.const.__MODULE__}/{$v.controller}/{$v.method}">{$v.name}</a></div>
    {/if}
    {/foreach}
</div>
<div>
    <form method="get" action="{$smarty.const.__CONTROLLER__}/BestSellers">
        <input type="text" id="find_goods" name="find_goods">
        <input type="submit" value="搜索">
    </form>
</div>
<input type="button" onclick="insert_data()" value="添加">
<div id="insert_data"  style="display: none; position: absolute; top: 50%;left: 40%;">
    <form onsubmit='return send_data_best("{$smarty.const.__CONTROLLER__}/upload_photo","add")'>
        标题:<input type="text" name="title" id="title_add">
        商品标号:<input type="text" name="goodsCode" id="goodsCode_add">
        <input type="submit" value="添加">
    </form>
</div>
<div>
    {foreach $goods_list as $k => $v}
    <div>
        <div>{$v.title}</div>
        <div>{$v.goodsCode}</div>
        <div>{$v.time}</div>
        <input type="button" value="编辑"
               onclick='update_data("{$v.id}","{$smarty.const.__CONTROLLER__}/updateNewGoods")'>
        <input type="button" value="删除"
               onclick='delete_data("{$v.id}","{$smarty.const.__CONTROLLER__}/deleteNewGoods")'>
    </div>
    {/foreach}
</div>
{$page_list}
<div style="display: none;position: absolute ;top: 50%;left: 40%" id="prompt">
    <form onsubmit='return send_data_best("{$smarty.const.__CONTROLLER__}/upload_photo","update")'>
        <input type="hidden" name="hidden_id" id="hidden_id">
        标题:<input id="title" type="text" name="title" value="">
        商品标号:<input id="goodsCode" type="text" name="goodsCode" value="">

        <input type="submit" value="提交">
    </form>
</div>
</body>
</html>